import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
import ArcoVue from "@arco-design/web-vue";
import "@arco-design/web-vue/dist/arco.css";
import "./style.css";
import router from "./router";
import ArcoVueIcon from "@arco-design/web-vue/es/icon";
import i18n from "./locale";
import "./utils/request";
import pinia from "./store/index"; // 引入 Pinia 实例
// import 'vue-monoplasty-slide-verify/dist/style.css';
// import SlideVerify from 'vue-monoplasty-slide-verify';
import VueVideoPlayer from "vue-video-player";
import "video.js/dist/video-js.css";
import "vant/lib/index.css";
import 'mathjax/es5/tex-mml-chtml.js'; // 引入 MathJax
import { Button, Progress, Circle , Col, Row,Icon} from "vant";
import { MathJaxPlugin } from './utils/mathjax'; // 导入插件
import './assets/css/media.less'

// 1. 读取 localStorage 中的自定义标题
const customTitle = localStorage.getItem('webtitle')

// 2. 如果存在，就替换 document.title
if (customTitle) {
  document.title = customTitle
}

const app = createApp(App);
app.use(MathJaxPlugin);
app.use(Progress);
app.use(Icon);
app.use(Col);
app.use(Row);
// 3. 注册你需要的组件
app.use(Circle);
app.use(Button);
app.use(ArcoVue);
app.use(router);
app.use(pinia); // 安装 Pinia 插件
app.use(VueVideoPlayer);
app.use(ArcoVueIcon);
app.use(i18n);

app.mount("#app");
